// @coding: utf8

#include <iostream>
#include <cstdint>
#include <vector>
#include <algorithm>
#include <cassert>
#include <ctime>
#include <random>
#include <chrono>


int ALL_CARDS[] = {
    0x102,0x103,0x104,0x105,0x106,0x107,0x108,0x109,0x10a,0x10b,0x10c,0x10d,0x10e, //分别代表方块2,3,4,5,6,7,8,9,10,J,Q,K,A
    0x202,0x203,0x204,0x205,0x206,0x207,0x208,0x209,0x20a,0x20b,0x20c,0x20d,0x20e, //分别代表梅花2,3,4,5,6,7,8,9,10,J,Q,K,A
    0x302,0x303,0x304,0x305,0x306,0x307,0x308,0x309,0x30a,0x30b,0x30c,0x30d,0x30e, //分别代表红桃2,3,4,5,6,7,8,9,10,J,Q,K,A
    0x402,0x403,0x404,0x405,0x406,0x407,0x408,0x409,0x40a,0x40b,0x40c,0x40d,0x40e, //分别代表黑桃2,3,4,5,6,7,8,9,10,J,Q,K,A]
    0x50f, //代表小王
    0x610, //代表大王
};

// 花色
enum ECardColor : int
{
    kHeart = 1,
    kSpade = 2,
    kClub = 3,
    kDiamond = 4,
};

// 牌型
enum EPokerHandType : int
{
    kInvalid = 0,  // 无效类型
    kRoyalFlush = 1,  // 皇家同花顺
    kStraigthFlush = 2, // 同花顺
    kFourOfAKind = 3, // 金刚
    kFullHouse = 4,  // 葫芦
    kFlush = 5,  // 同花
    kStraigth = 6,  // 顺子
    kThreeOfAKind = 7,  // 三条
    kTwoPair = 8,  // 两队
    kOnePair = 9,  // 一对
    kHighCard = 10,  // 高牌
};

// @brief 获取指定花色
inline int get_color(int card)
{
    return card >> 8;
}

// @brief 获取牌值
inline int get_value(int card)
{
    return card & 0x00ff;
}

// @brief 比较两张扑克:  left < right
inline bool compare_card_lesser(int left, int right)
{
    auto left_value = get_value(left);
    auto right_value = get_value(right);
    if (left_value < right_value)
        return true;
    else
    {
        if (left_value == right_value)
        {
            if (get_color(left) < get_color(right))
                return true;
        }

    }
    return false;
}

int main()
{
    return 0;
}